home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Filing / DLL / MakeDLL < prev    next >
Text File  |  1995-08-28  |  4KB  |  146 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Filenames    \
  4.             o.ReadDir    \
  5.             o.ScanDir    \
  6.             o.ScanDirDir    \
  7.             o.Single    \
  8.             o.SingleFull    \
  9.             o.CanonPath    \
  10.             o.File20    \
  11.             o.GBPB10    \
  12.             o.GBPB11    \
  13.             o.GBPB9    \
  14.             o.MakePath    \
  15.             o.Single2    \
  16.             o.SingleFul2    \
  17.  
  18.  
  19. LibName        =    Filing
  20.  
  21.  
  22.  
  23. # Template makefile to make Straylight Dynamic Link 
  24. # Library from a DeskLib sublibrary's .o files
  25. #
  26. # The DLL is made in the directory 
  27. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  28. # and has the same name as the DeskLib sublibrary.
  29. #
  30. # Julian Smith 17 Apr 1995.
  31.  
  32. # The macro $(ObjectFiles) should be set at the 
  33. # start of this file, to be a space-separated
  34. # list of object files.
  35. # This is done by 'Makatic'.
  36.  
  37. # The macro $(LibName) should also be set at the 
  38. # start of this file, to be the name of the 
  39. # DeskLib sublibrary.
  40. # This is done by 'Makatic'.
  41.  
  42. # Note that this makefile doesn't use cc at all
  43. # - it merely links existing .o files.
  44.  
  45. # Linker flags, These can be anything. 
  46. # All flags required by Straylight (eg Link -rmf) 
  47. # are included in the $(LINK) macro.
  48. #
  49. LinkFlags    =    $(LinkExtra)
  50.  
  51.  
  52. # Macros for commands, including the Straylight
  53. # tool 'cdll'. Note that DRLink doesn't seem to
  54. # work with the SDLS.
  55. #
  56. LINK        =    Link -rmf
  57. CDLL        =    cdll
  58.  
  59.  
  60. # Filename of the thing we need to make: - the main
  61. # dynamically-linked library, which will go in the 
  62. # !DLL application.
  63. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  64. # application) should be the same as the 'name' field in the
  65. # $(DLL_Def) file. In this case, this is $(LibName).
  66. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  67.  
  68.  
  69. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  70. #
  71. DLL_Header    =    Header
  72. DLL_Def        =    ^.DLLDef
  73. DLL_Stubs    =    Stubs
  74.  
  75.  
  76.  
  77. # -------------------------------------------------------
  78. # Everything below here should probably not be changed...
  79. # -------------------------------------------------------
  80.  
  81.  
  82. # Extra libs, written by Straylight, which always need to be linked into a DLL
  83. #
  84. SDLS_ExtraObjects=                    \
  85.             C:DLLLib.o.DLLLib        \
  86.             C:DLLLib.o.dstubs        \
  87.  
  88.  
  89. # Extra DeskLib libraries which need to be linked into the final DLL.
  90. # The DLL DeskLib library is included here because some DeskLib DLLs may
  91. # refer to other DeskLib DLLs.
  92. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  93. # the sublibraries for which there is a DLL - just the DLL Stubs file
  94. # is included for these.
  95. #
  96. DeskLib_ExtraObjects=                \
  97.             DeskLib:o.DLLDLL    \
  98.  
  99.  
  100.  
  101.  
  102. #Here's what we want to make...
  103.  
  104. All:    $(DLL_Lib)
  105.  
  106. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  107.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  108.  
  109.  
  110.  
  111. # Here's how to make the things which are needed in the above rules
  112.  
  113. $(DLL_Def):    
  114.     | Error: No DLL definition file exists.
  115.     |        You should run th MkStubsOs makefile
  116.     |        and then alter the template Def
  117.     |        file by hand.
  118.  
  119. $(DLL_Header):    $(DLL_Def)
  120.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  121.  
  122.  
  123. # Rule for compiling C source code for a Straylight dynamically-linked library.
  124. # Actually, we don't call cc - we complain and tell the user to run the 
  125. # MkStubsOs makefile.
  126.  
  127. VPATH = @.^
  128.  
  129. .SUFFIXES:    .o .c .s
  130. .c.o:
  131.     | $@ needs recompiling. This should be done by
  132.     | running the MkStubsOs or MkOs makefile before running
  133.     | this makefile.
  134.     |
  135.  
  136. .s.o:
  137.     | $@ needs assembling. This should be done by
  138.     | running the MkStubsOs or MkOs makefile before running
  139.     | this makefile.
  140.     |
  141.  
  142.  
  143.  
  144. # Dynamic dependencies:
  145.